$(document).ready(function()
{
	var eAdminFunc = $('#strAdminFunc');
	if (!eAdminFunc.val()) return;
	var arrAdminFunc = eAdminFunc.val().split(',');
	$('#form input[type=checkbox]').each(function()
	{
		if (this.getAttribute('name')=='admin_func[]')
		{
			if ( gFunction.in_array(this.value, arrAdminFunc) )
			{
				this.checked = true;
				doCheckFunc(this);
			}
		}
	});
});

function doCheckFunc(e)
{
	var v 	= e.checked;
	var el	= $('#li_'+e.value);
	el.removeClass('choose');
	if(v)
	{
		el.addClass('choose');
	}
}

function checkFormAdd()
{
	var e = $('#txtGroupName');
	if (!e.val())
	{
		e.focus();
		return false;
	}
	return true;
}